<?php

/**
 *  用户
 * @author xiaojy xiaojy@wanthings.com
 * @copyright 成都网信天成科技有限公司, 2016, http://www.wanthings.com
 */
class UserInfo extends BaseActiveRecord
{

    public $column_name = 'mobile';
    public $module_id = 'user_info';

    CONST STATUS_NORMAL = 1;    //正常
    CONST STATUS_DISABLE = 2;    //禁用


    /*
     * 获得数据表方法
     * 重写父类方法tableName()
     */

    function tableName() {
        return "{{user_info}}";
    }

    /*
     * 获得当前类对象的方法model
     * 重写父类方法model
     */

    public static function model($className = __CLASS__) {
        return parent::model($className);
    }





    public function behaviors()
    {
        return array(
            'UserInfoBehavior' => array(
                'class' => 'application.behaviors.UserInfoBehavior'
            ),
            'CTimestampBehavior' => array(
                'class' => 'zii.behaviors.CTimestampBehavior',
                'createAttribute' => 'ctime',
                'updateAttribute' => 'mtime',
                'setUpdateOnCreate'=> true,
            ),
            'UserTokenBehavior'=>array(
                'class'=>'application.behaviors.UserTokenBehavior'
            )

        );
    }


}